package com.yfp.machine.controller;

import com.yfp.common.core.domain.R;
import com.yfp.machine.service.MachineErrorService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.web.bind.annotation.*;


/**
 * (MachineError)表控制层
 *
 *
 * @since 2023-12-14 13:53:34
 */
@RestController
@RequestMapping("machineError")
@Tag(name = "设备故障相关")
public class MachineErrorController {
    /**
     * 服务对象
     */
    @Resource
    private MachineErrorService machineErrorService;

    @GetMapping("{machineId}")
    @Operation(summary = "根据设备Id查询设备错误信息")
    public R queryMachineErrorByMachineId(@Valid @PathVariable("machineId") String machineId) {
        return R.ok(this.machineErrorService.queryMachineErrorByMachineId(machineId));
    }

}

